<?xml version="1.0" encoding="ISO-8859-1" ?>

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
	xmlns:c="http://java.sun.com/jstl/core_rt">
	<jsp:directive.page contentType="text/html; charset=ISO-8859-1"
		pageEncoding="ISO-8859-1" session="false" />
	<jsp:output doctype-root-element="html"
		doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
		doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
		omit-xml-declaration="true" />

	<table>
		<caption>List of books</caption>
		<thead>
			<tr>
				<th>Title</th>
				<th>Author</th>
				<th>Operation</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${books}" var="book" varStatus="status">
				<tr>
					<td>${book.title}</td>
					<td>${book.author}</td>
					<td>
						<form action="delete-book" method="post">
							<input type="hidden" value="${status.index}" name="index" /> <input
								type="submit" value="Delete" />

						</form>
						<form action="books">
							<input type="hidden" value="${status.index}" name="index" /> <input
								type="submit" value="Edit" />
						</form>
					</td>
				</tr>
			</c:forEach>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="3">Number of books is ${count}</td>
			</tr>
		</tfoot>
	</table>

</jsp:root>